Skip to content

Conversation

@pcustic
Copy link
Contributor

@pcustic pcustic commented Nov 2, 2025

Closes #3311

Recent PR added some dependancies that don't have builds for Intel MacBooks, so as per suggestion by @DouweM I added environment markers to skip installation for problematic libraries on Intel Macs.

pyproject.toml Outdated
outlines-mlxlm = ["pydantic-ai-slim[outlines-mlxlm]=={{ version }}"]
outlines-sglang = ["pydantic-ai-slim[outlines-sglang]=={{ version }}"]
outlines-vllm-offline = ["pydantic-ai-slim[outlines-vllm-offline]=={{ version }}"]
outlines-vllm-offline = ["pydantic-ai-slim[outlines-vllm-offline]=={{ version }} ; (sys_platform == 'linux') or (sys_platform == 'darwin' and platform_machine == 'arm64') or (sys_platform == 'win')"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure we need it here as well? I think having it just in the slim package would be enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct, removed in 863f131

outlines-mlxlm = ["outlines[mlxlm]>=1.0.0, <1.3.0 ; (sys_platform == 'linux') or (sys_platform == 'darwin' and platform_machine == 'arm64')"]
outlines-sglang = ["outlines[sglang]>=1.0.0, <1.3.0", "pillow"]
outlines-vllm-offline = ["vllm; python_version < '3.12'", "outlines>=1.0.0, <1.3.0"]
outlines-vllm-offline = ["vllm; python_version < '3.12' and ((sys_platform == 'linux') or (sys_platform == 'darwin' and platform_machine == 'arm64') or (sys_platform == 'win'))", "torch; (sys_platform == 'linux') or (sys_platform == 'darwin' and platform_machine == 'arm64') or (sys_platform == 'win')", "outlines>=1.0.0, <1.3.0 ; (sys_platform == 'linux') or (sys_platform == 'darwin' and platform_machine == 'arm64') or (sys_platform == 'win')"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to verify: Is this necessary for all of them, not just mlxlm?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, it is not necessary for outlines-llamacpp, others need to stay because multiple libs are problematic (mlxml, torch, ray)

outlines-transformers = ["outlines[transformers]>=1.0.0, <1.3.0", "transformers>=4.0.0", "pillow"]
outlines-llamacpp = ["outlines[llamacpp]>=1.0.0, <1.3.0"]
outlines-mlxlm = ["outlines[mlxlm]>=1.0.0, <1.3.0"]
outlines-transformers = ["outlines[transformers]>=1.0.0, <1.3.0 ; (sys_platform == 'linux') or (sys_platform == 'darwin' and platform_machine == 'arm64') or (sys_platform == 'win')", "transformers>=4.0.0 ; (sys_platform == 'linux') or (sys_platform == 'darwin' and platform_machine == 'arm64') or (sys_platform == 'win')", "pillow", "torch; (sys_platform == 'linux') or (sys_platform == 'darwin' and platform_machine == 'arm64') or (sys_platform == 'win')"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should win be win32 considering https://docs.python.org/3/library/sys.html#sys.platform?

Would it be possible to state only the platform we don't support, rather than having to exhaustively list those we do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion, I changed it to list platforms that are not supported in 863f131

@DouweM DouweM changed the title Add environment markers to skip install of outlines dependancies on Intel Macs Skip installing outlines dependencies mlx, vllm, torch on Intel Macs Nov 4, 2025
@DouweM DouweM enabled auto-merge (squash) November 4, 2025 22:28
@DouweM DouweM merged commit 04a01ef into pydantic:main Nov 4, 2025
59 of 61 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Building environments (make install-all-python) fails on Intel Macs

2 participants